(function(){
	if (!loadItem("web3js_wallet")){
		alert("您还没有内置钱包，请先创建");
        goto("wallet/addnew");
	}else{
        if (!checkConnect()) return;
        if (publicParam.usewallet=="builtIn"){
            setNodeText("address",publicParam.address);
            getNode("pswd1").onkeyup=function(e){
                if (13== e.keyCode) go();
            };
            setEye(1);
            getNode("ok").onclick = go;
            async function go(){
                var pswd1=getNode("pswd1").value;
                if (pswd1.length<8){
                    setNodeText("errmsg","密码最少8位");
                    return;
                }
                setLoading(1);
                var rtn = await getWallet(pswd1);
                if(rtn) {
                    display("after",true);
                    setNodeText("private",rtn.privateKey);
                }
                else setNodeText("errmsg","密码不正确");
                setLoading(0);
            };
        }else{
            alert("只有使用内置钱包时才可以使用此功能查看");
        }
    }
})();